package com.itheima.propertiesIO;

import java.util.Map;
import java.util.Properties;
import java.util.Set;

public class properttiesDemo01 {
    public static void main(String[] args) {
        Properties prop=new Properties();
        prop.put("撒野","辰");
        prop.put("魔道","蓝羡");
        prop.put("天官","花怜");
//        Set<Object> keys = prop.keySet();
//        for (Object key : keys) {
//            System.out.println(prop.get(key));
//        }
//        Set<Map.Entry<Object, Object>> entries = prop.entrySet();
//        for (Map.Entry<Object, Object> key : entries) {
//            System.out.println(key.getKey()+"=="+key.getValue());
//        }
        String value = prop.getProperty("天官");
        System.out.println(value);
        Set<String> keys = prop.stringPropertyNames();
        for (String key : keys) {
            String values = prop.getProperty(key);
            System.out.println(key+"=="+values);
        }

    }
}
